package com.bajiao.vo.order;

import com.alibaba.fastjson.annotation.JSONField;
import com.bajiao.entity.order.OrderDetails;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
@ApiModel("OrderResponse")
public class OrderResponse {

    @ApiModelProperty("订单id")
    private String id;
    @ApiModelProperty("订单编号")
    private String orderNo;
    @ApiModelProperty("店铺名称")
    private String storeTitle;
    @ApiModelProperty("店铺id")
    private String storeId;
    @ApiModelProperty("状态 0-待支付 1-待使用 2-已使用 7-退款中 8-已退款 9-已取消")
    private Integer status;
    @ApiModelProperty("状态")
    private String statusConv;
    @ApiModelProperty("购买数量")
    private Integer buyNum;
    @ApiModelProperty("下单时间")
    private String createTimeStr;
    @ApiModelProperty("实付款")
    private BigDecimal payPrice;

    @ApiModelProperty("支付方式 1-余额 2-微信")
    private Integer payType;

    @ApiModelProperty("商品详情")
    private List<OrderDetails> orderDetails;

    @ApiModelProperty(value = "过期时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date expireTime;

    @ApiModelProperty("过期时间戳")
    private Long expireTimeStamp;
}
